Counting chiral operators in quiver gauge theories