Removed raw SQL queries

 * added `count` property in TagRecord,
 * using SQLAlchemy Query instead of raw SQL in views.
Removed count from __init__ and to_json methods
Merge pull request #292 from wybczu/master

Removed raw SQL queries