3.0 - Removing FunctionsTrait

This removes FunctionsTrait and replaces it with a separate class `FunctionsBuilder`. This allowed to rename `Query::total()` to `Query::count()`