Saw a couple of errors in your code.
You have
Dim dbs As DAO.Database
but then you have
Set db = CurrentDb()
Do you have "Option Explicit" as one of the first lines of each code module?
If there are records, the recordcount property is 1 until you move to the last record. Then you get the true record count.
I also modified your code: (my changes are in Blue)
Code:
Option Compare Database '< should be at the top of the module
Option Explicit '< should be at the top of the module
Sub Order(recipe_id As Integer, recipe_qty As Integer)
Dim dbs As DAO.Database
Dim rs As DAO.Recordset
Dim strSQL As String
Dim count As Integer
Dim msg As String '< unused
' Set db = CurrentDb()
Set dbs = CurrentDb()
' set default
count = 0
strSQL = "SELECT * FROM `ingredients` WHERE recipe_id = " & recipe_id & ";"
Set rs = dbs.OpenRecordset(strSQL)
If Not rs.BOF And Not rs.EOF Then
rs.MoveLast
count = rs.RecordCount
End If
rs.Close
Set rs = Nothing
Set dbs = Nothing
MsgBox (count)
End Sub