Japanese Prime Minister Takaichi Sanae has pledged measures to protect people amid a rising number of bear attacks.