Programmable robots are now found in many early childhood centres. However, little research has considered how young children’s problem solving may link computational thinking to mathematical understandings. While most research about robots in kindergarten is from intervention studies to improve children’s computational thinking, in this study we observed two children solving tasks with a robot in a naturalistic setting. We identified when the children had a problem that they could not immediately solve, by looking for signs of uncertainty, for example by putting their hand to their mouth, stopping and/or looking up at the teacher. By analysing the children’s problem solving of those problems, alongside a teacher, we were able to identify how aspects of computational thinking were connected to mathematical understanding. In particular, number understandings, such as the difference between ordinal and cardinal counting and early addition, seemed important for solving problems related to sequencing, decomposition and debugging. The children’s developing understanding about counting may have contributed to the children’s uncertainty about programming the robot.