If you're using Postgres table inheritance, a simple select count(*) from calls where foo is null
will work fine. It will use an index on foo provided null foo rows aren't too common.
Internally, that will do what you'd do manually without table inheritance, i.e. union all
the result for each individual child table.
If you need to run this repeatedly, maintain the count in memcached or in another table.