请给我编写一个使用motifs统计基因序列中特定模式出现次数的Python函数。函数签名应该是`def count_motifs(sequence: str, motif: str) -> int:`
user
```python
def count_motifs(sequence: str, motif: str) -> int:
    count = 0
    motif_length = len(motif)
    for i in range(len(sequence) - motif_length + 1):
        if sequence[i:i + motif_length] == motif:
            count += 1
    return count
```
assistant