Solution

Total 50, arranged as follows:

    4  5  1  3
    3  2  4  5
    5  1  3  2
    2  4  5  1


Xpress-Mosel Model
model 'stamp'

!  Description  : The gentle art of stamp-licking
!  Source       : Dudeney, H.E., (1917), Amusements in Mathematics, Thomas Nelson and Sons.
!  Date written : Xpress-MP May 2000, Mosel 19/4/03
!  Written by   : M J Chlond

  uses 'mmxprs'
  
  parameters
    size = 4
    stamp = 5
  end-parameters

  declarations
    S = 1..size
    T = 1..stamp
    x: array(S,S,T) of mpvar ! X(i,j,k)=1 if cell {i,j} has stamp value k, 0 otherwise
    a: array(S,S,T) of mpvar
  end-declarations

  value:= sum(i in S,j in S,k in T) k*x(i,j,k)

  forall(i in S,j in S)
    ones(i,j):= sum(k in T) x(i,j,k) <= 1

  forall(i in S,j in S,k in T) do
   
    ! a(i,j,k) = 1 if stamp on square {i,j} is in line with similar stamp
    sta(i,j,k):= sum(m in S | m <> i and m-i+j >= 1 and m-i+j <= size) x(m,m-i+j,k)+
                 sum(m in S | m <> i and i+j-m >= 1 and i+j-m <= size) x(m,i+j-m,k)+
                 sum(m in S | m<> i) x(m,j,k) + sum(m in S | m <> j) x(i,m,k) <= 99*a(i,j,k) 
  
    ! square not both occupied and attacked by same stamp value
    ma(i,j,k):= a(i,j,k)+x(i,j,k) <= 1

    x(i,j,k) is_binary
    a(i,j,k) is_binary
    
  end-do

  maximise(value)

  write(getsol(value))
  writeln    
  forall(i in S) do
    forall(j in S)
      write(sum(k in T) k*getsol(x(i,j,k)),' ')
    writeln
  end-do
  
end-model