In what year was the first census taken?

In 1085 by William the Conqueror, and resulted in the Domesday or Doomsday Book.