Very simply using base R functions:
table(data)
# transect
#species EH1 EH2
# fox 1 0
# rabbit 2 3
Edit: In response to your edit, you can use:
library(reshape2)
melt(table(data))
# species transect value
#1 fox EH1 1
#2 rabbit EH1 2
#3 fox EH2 0
#4 rabbit EH2 3
To get the second output you requested.