The Man Who Counted (original Portuguese title: O Homem que Calculava) is a book on recreational mathematics and curious word problems by Brazilian writer Júlio César de Mello e Souza, published under the pen name Malba Tahan.
The book has been published in many other languages, including Catalan, English (in the UK and in the US),[2] German, Italian, and Spanish, and is recommended as a paradidactic source in many countries.
First published in Brazil in 1949, O Homem que Calculava is a series of tales in the style of the Arabian Nights, but revolving around mathematical puzzles and curiosities.
The first two chapters tell how Hanak Tade Maia was traveling from Samarra to Baghdad when he met Beremiz Samir, a young lad from Khoy with amazing mathematical abilities.
In all those events, Beremiz Samir uses his abilities with calculation like a magic wand to amaze and entertain people, settle disputes, and find wise and just solutions to seemingly unsolvable problems.