You can build one Mortar from Town Hall 3 to Town Hall 5, two Mortars at Town Hall 6, three Mortars at Town Hall 7, and four Mortars from Town Hall 8 onwards.