Adds count() and countBy() as suggested by #27. This provides a much more reasonable API for getting realized lengths solving #33.