I can answer for Sudan, but not Ethiopia. I run a website on the Jews of Sudan and am currently working on a book on the subject.
The history of the Jews in Sudan is very sparsely sourced and a lot of my research is based on oral history, but I’ll do by best. The first is the slightly isolated case of the Jewish settlement at Elephantine. This settlement comprised largely of Jewish mercenaries and their families, and was well established in 525BCE when Persian forces conquered the area. The settlement contained a shrine and mini-temple with an altar for sacrifices to the Jewish god. (Rosenberg, The Jewish Temple at Elephantine, Near Eastern Archaeology: 2004). Elephantine is now in Egypt, but was then part of Nubia and regular trade was made with the people living in what is now Sudan.
The Jewish explorer David Reubeni mentioned a Jewish guide when he wrote about his visit to Sudan in 1523 and H.E Hirschberg writes about hints that Jewish traders in Sudan were doing business with merchants in Tripoli throughout the 18th century. (A History Of The Jews In North Africa, 1981). It’s not much, but it does go to show that there was some semblance of a Jewish presence in Sudan throughout the centuries.
To talk about more modern history and the Jews of Sudan, some background history is needed. In 1820 when Muhammad Ali, viceroy of Egypt under the Ottoman Empire, sent his son to conquer Sudan. It took a couple of years and his son got gruesomely murdered, but eventually Sudan came under the control of the Ottoman Empire, with Egypt holding governorship of the region. Ottoman rule was unsurprisingly, not very popular. But it wasn’t until 1885 that Ottoman rule ended. In 1881 the rebel leader Muhammad Ahmed styled himself as el-Mahdi (the Guided One). His forces swept through the country and by 1885 they famously defeated the British Governor-General Charles Gordon at Khartoum. The Mahdi then very quickly died of typhoid, and his successor Abd Allah (known as the Khalifa) took over command, however, the next thirteen years are named ‘The Mahdiyya’ after Muhammad Ahmed. During the Mahdiyya, all non-Muslims were ordered to convert to Islam, or face execution. The law was intended to put an end to the large number of Christian missionaries who had moved to Sudan under the Ottoman Empire, but caught up in it were the Jews living in the country. In 1898, the British Empire came onto the scene, and the Mahdiyya conversion laws were repealed.
I’ll also put in a little digression about Jews in the Ottoman Empire here. Jews in the Ottoman Empire were given Dhimmi status – they were second class citizens, but allowed to carry on with their lives and practice their religion, as long as they paid their taxes. How well they were treated largely depended on the ruler in the area at the time. I won’t go into it now, but Martin Gilbert has written some great stuff about this. Pogroms flared up quite often, especially in Iraq, and because travel within the Empire was relatively easy, Jewish people facing persecution or seeking better economic prospects would move about quite a bit. There was a large Syrian Jewish community in Egypt, for example. And a lot of Syrian Jews moved to Iraq in the early 18th century.
So how does this all fit together? Well, we know that there was no formal Jewish community in Ottoman Sudan - there was no purpose-built synagogue or Rabbi, for example. However, tracking down how many Jews were actually living in the country is almost an impossible task thanks to the Mahdiyya conversion laws. We know for certain that Jewish administrators were sent to El-Obaid from Egypt, and we also know that when the British entered Omdurman they listed 36 Jews as living in the city. Some of these chose to revert to Judaism, others opted to remain Muslim. And that’s what makes this very, very tricky.
One man I interviewed grew up in Sudan, and now lives in the UK. At home in Sudan he had grown up without a religion listed on his ID card, something quite unusual, and his family did not really practice Islam. He did a DNA test and was surprised to find a large proportion of Iraqi-Jewish ancestry. He started talking to his elders and his father produced a kippah (Jewish skull cap) and tallit (Jewish prayer shawl) that had been hidden in the house. His family are not one of those listed amongst the 36 Jews.
I have built up quite a large social media presence and three people have separately messaged me to tell me that a grandparent was Jewish and converted under the Mahdi and that said grandparent does weird things like not working on a Saturday. I obviously can’t publish these messages on a public forum, but am happy to show them to mods while retaining the privacy of the individuals who sent them. All this to say, that due to the very messy history and fear that people still feel (antisemitism in Sudan is still very much alive and well), it’s almost impossible to pin down a number, except to say that it’s very likely there were more Jews than can be accounted for in Sudan during the Ottoman period.
Now I can move onto firmer ground. Of the 36 Jews in Omdurman, the most well known (and well to do) was a man called Moshe Ben Zion Coshti. He changed his name to the Arabised Musa Bassiouni. He’s a fascinating character and I highly recommend reading Robert Kramer’s 2015 article, ‘The Death of Bassiouni: A Case Of Complex Identity in the Sudan’ in Canadian Journal of African Studies, on his life. But I’ll move swiftly on because this is getting very long! As Sudan was now part of the British Empire, and Khartoum connected to Egypt with a brand-new railway line, Jewish merchants (and I use this word quite generously) began to arrive in Sudan, making the journey from across the Middle East to Egypt and then down to Sudan. In 1907 Bassiouni organised the Jews in Sudan, placed the Jewish community of Sudan under the jurisdiction of the Egyptian Beth-Din (Jewish law courts), and sent for a Rabbi. (E. Malka, Jews of the Sudan, 1997). This was the start of the modern Jewish community of Sudan, the last of whom left in the early 1970s.