I built a cow farm in Minecraft, but you should know how to see how many cows are in a block.
I know you have to press F3, but I don't know where you see it.
Build a gold plate under the cows, which will give you a corresponding redstone output.
(e.g. 10 block signal = 10 cows)
In F3 (left, upper half) you see it at "E:", which is close to "All:". But you have to look very closely at the cows (and ONLY the cows) (counts the mobs in the field of view). And I think that counts for yourself, so subtract 1.