Is there a way to query the number of packages in a given repository by means of pacman. Or yaourt, perhaps.
Don't know of a direct way, though you could pipe the output of pacman -Sl though wc
Using mcmillan's idea:
pacman -Sl | grep *repo* | wc -l
For example, to get a count of how many packages are in multilib:
pacman -Sl | grep multilib | wc -l 149
This can be verified using the package search on the Arch website.
Machine: Gateway NV55C Dual core Intel Pentium CPU P6100