Amazon interview question

Create an algorithm to find the length of a binary tree.