fix filter and orm bugs, add InkSql.Count method