Sql Count Over Partition With Condition