How many 4-digit numbers can be created such that the only digits that can be used are 3, 6 and 9, a specific digit can occur at most three times in the number, and the number must be divisible by 9?