I have tried to find an answer on google but could never come up with a result. Say in a typical seige how many men would be in a medieval fortress.
That varies extremely - at times there might be a full army in the fortress, at times it may have been caught with only a skeleton garrison. You are talking about a period of several hundred years and European style castles from North Africa to Jämtland, from Ireland to the Middle East.
I can provide som examples though.
Conwy Castle in Wales had a permanent garrison of 1 Constable, 30 men-at-arms (of which 15 were crossbowmen), 1 carpenter, 1 chaplain, 1 blacksmith, 1 mason and 1 engineer. This is probably how the garrison of the castle itself looked when it was taken by surprise and ruse by forces loyal to Owain Glyndŵr in 1401.
As a counter-example, Krak des Chevaliers, the Crusader castle which is still considered one of the peak medieval fortresses housed a permanent garrison of 2 000 men.
How many men there were in a castle varied a lot. Many castles were small fortresses built for the locals to flee to in case of an attack. These would, like Conwy, be manned only by a skeleton crew of a few men, but in times of trouble be manned by a sizable militia raised from the locals.
Other castles were also manors and the centre of a local lord (who might or might not live in his castle part of the year - travelling between estates were common among nobility during medieval times, to not exhaust all the resources in one location). If the lord is present, so is his retuny, some relatives and wards and the local garrison, plus any militia the lord might raise in case of trouble.
Some castles, such as the Castle of Castro Marim in Portugal, or Krak des Chevaliers in Syria was held my military orders and were constructed in contested lands and would hold sizable permanent garrisons to fight raiders, collect taxes or conduct their own raids.
If you want a more specific answer, you will have to specify a bit more. There's no thing as a "typical" castle or siege.
Isn't that very dependent on the fort's location/importance and whether leadership had the foresight to strengthen the garrison? Like if the armies are on the march, there would probably be fewer people manning the defense, where as if they're not on the offense, or had just been in peace time, they're going to be at a fuller capacity. And even then, max capacity is still variable on the size and location of the fort, as well as its intended use.
I'm sure someone will give you actual figures of average mins and maxes, but I couldn't expect the hypothetical figure to always be near the historical figure.