expose a count() function