If A = { a, b } and B = { 1, 2 } be two sets , then the number of relations that can be formed from the set A to set B is