Refactored PageCount and WordCount into relationaldb