Python Get Number Of Substring In Sql