First off, I think that the verb to count doesn't work well in the context of making mathematicalензщ calculations using your intellectual ability, in other words--solving math problems mentally. The process may also be reffered to as "mental maths" or mental arithmetic that is doing calculations in your mind, without writing down any numbers. If you google for "calculate mentally" or "mentally calculate", you'll find lots of examples.
Also, see the " in one's head" phrase which in your case hits the bull's eye, as Tromano pointed out in his comment:
He was great with math and could give you batting averages calculated
in his head. (the source)