Lt Col Paddy Ankunda said today that all soldiers were accounted for and that none was captured.
He said 10 of the bodies will be flown back home today.
Al-Shabab claimed it killed 50 Ugandan soldiers at the base in the small farming town of Janale, an account disputed by Ugandan officials.
Uganda was the first country to send troops to Somalia to back up the country's weak federal government under the banner of the African Union.
