str.count(sub[,start[,end]])
>>> str = "www.xnip.cn" >>> str.count('.') 2
>>> str = "www.xnip.cn" >>> str.count('.',1) 2 >>> str.count('.',2) 2
>>> str = "www.xnip.cn" >>> str.count('.',2,-3) 1 >>> str.count('.',2,-4) 1