It is impossible to give an exact number of dogs in Africa.
There is no continent-wide census, dog ownership varies widely, and stray populations are difficult to track. However, there are certainly millions of dogs across the continent, both owned and stray.
For region-specific data, consult organizations like the World Health Organization or animal welfare groups working in Africa.