Statistics compiled by the Japanese government show that the number of foreign workers in the country hit a record high last year, surpassing 2.3 million.