Manually count shards rather than using \d

The latter's rows include the owner, which could differ depending upon
test environment. Better to count by hand.